import { Button } from 'antd';
import { useState, useEffect } from 'react'
import DarkCard from '../../../../../common/DarkCard';
import LittleTitle from '../../../../../common/LittleTitle';
import { CloseCircleOutlined } from '@ant-design/icons'
export default function Leftpanel(props) {
    return <div style={{
        position: "absolute",
        left: 48,
        top: 30,
        width: 450,
        bottom: 30,
        zIndex: 1,
        display: "flex"
    }}>
        {/* 关闭div框 */}
        <Button icon={<CloseCircleOutlined />} type={"text"} style={{
            position: "absolute",
            top: 10,
            right: 10
        }} onClick={e => props.onClose?.()}></Button>
        <DarkCard className={"layout-v fill"} style={{
            width: '100%'
        }}>
            <LittleTitle>
                <span>{props.title}</span>
            </LittleTitle>
            <div className='fill h0 layout-v' style={{
                overflow: "auto"
            }}>{props.children}</div>
        </DarkCard>
    </div>
}